!{include file='common/iheader.htm'}
<div id="i_nav">
	<h3 class="page_title">未归类图片管理</h3>
	<a class="button" href="/manager.php?app=wiki">Wiki管理</a>
	<a class="button" href="/manager.php?app=wiki&act=recommend&type=0">引用管理</a>
</div>
<form id="wiki_form" method="post" action="/manager.php?app=wiki&act=used">
	<ul class="list_view">
		!{foreach from=$dicts item=dict key=id}
		<li id="l_!{$id}">
			<strong>!{$dict.word} <span>[!{$dict.create_time|date_format:"%Y-%m-%d"}] (!{$dict.images_count})</span></strong>
			<div class="opt_div">
			!{if $dict.images_count gt 0}
				<a href="/manager.php?app=spider&act=image_list&id=!{$id}">编辑图片</a>
				<a href="/wiki/!{$dict.word}" target="_blank">预览</a>
			!{else}
				<a href="javascript:void(0)" onclick="del_dict('!{$id}')">删除</a>
			!{/if}
			</div>
		</li>
		!{foreachelse}
		<li>
			<strong>暂无记录...</strong>
		</li>
		!{/foreach}
	</ul>
</form>
<div class="option_div">
	<div class="pager">
		!{include file='common/pager.htm'}
	</div>
</div>
<script>
	$(function(){
		
	});
	
	function del_dict(id){
		if(confirm('确定要继续删除？')){
			$.get('/manager.php?app=spider&act=del_dict&id=' + id, function(data){
				var json = eval('(' + data + ')');
				if(json.result){
					$("#l_" + id).remove();
				}else{
					alert(json.info);
				}
				
			})
		}
		
	}
</script>
!{include file='common/ifooter.htm'}